2 using System
.Runtime
.InteropServices
;
7 [InterfaceType(ComInterfaceType
.InterfaceIsIUnknown
)]
8 [Guid("000214E6-0000-0000-C000-000000000046")]
9 public interface IShellFolder
11 // Translates a file object's or folder's display name into an item identifier list.
12 // Return value: error code, if any
14 Int32
ParseDisplayName(
17 [MarshalAs(UnmanagedType
.LPWStr
)]
18 string pszDisplayName
,
21 ref ShellAPI
.SFGAO pdwAttributes
);
23 // Allows a client to determine the contents of a folder by creating an item
24 // identifier enumeration object and returning its IEnumIDList interface.
25 // Return value: error code, if any
29 ShellAPI
.SHCONTF grfFlags
,
30 out IntPtr enumIDList
);
32 // Retrieves an IShellFolder object for a subfolder.
33 // Return value: error code, if any
41 // Requests a pointer to an object's storage interface.
42 // Return value: error code, if any
50 // Determines the relative order of two file objects or folders, given their
51 // item identifier lists. Return value: If this method is successful, the
52 // CODE field of the HRESULT contains one of the following values (the code
53 // can be retrived using the helper function GetHResultCode): Negative A
54 // negative return value indicates that the first item should precede
55 // the second (pidl1 < pidl2).
57 // Positive A positive return value indicates that the first item should
58 // follow the second (pidl1 > pidl2). Zero A return value of zero
59 // indicates that the two items are the same (pidl1 = pidl2).
66 // Requests an object that can be used to obtain information from or interact
67 // with a folder object.
68 // Return value: error code, if any
70 Int32
CreateViewObject(
75 // Retrieves the attributes of one or more file objects or subfolders.
76 // Return value: error code, if any
78 Int32
GetAttributesOf(
80 [MarshalAs(UnmanagedType
.LPArray
)]
82 ref ShellAPI
.SFGAO rgfInOut
);
84 // Retrieves an OLE interface that can be used to carry out actions on the
85 // specified file objects or folders.
86 // Return value: error code, if any
91 [MarshalAs(UnmanagedType
.LPArray
)]
97 // Retrieves the display name for the specified file object or subfolder.
98 // Return value: error code, if any
100 Int32
GetDisplayNameOf(
102 ShellAPI
.SHGNO uFlags
,
105 // Sets the display name of a file object or subfolder, changing the item
106 // identifier in the process.
107 // Return value: error code, if any
112 [MarshalAs(UnmanagedType
.LPWStr
)]
114 ShellAPI
.SHGNO uFlags
,
115 out IntPtr ppidlOut
);